import pagesJson from '@/pages.json';

const createRoutes = () => {
  const pages = pagesJson.pages as {
    path: string;
    name: string;
    style: {
      navigationBarTitleText: string;
    };
  }[];
  const routes: Record<string, string> = {};
  for (let index = 0; index < pages.length; index++) {
    const route = pages[index];
    routes[route.name] = route.path;
  }
  return routes;
};

export const routes = createRoutes();
